package com.kzj.global.constant;

import io.swagger.models.auth.In;
import org.springframework.stereotype.Component;

import java.util.List;
@Component

public class GlobalConstant {
    public static final Integer STUDENT_CLASS_SERIAL_NUMBER_LEN=2;
    public static final String STATUS_ERROR="状态错误";

    public static final Integer STATUS_USABLE=1;
    public static final Integer STATUS_UNUSABLE=0;
    public static final Integer ROB_CLASSES_TIME=1;
    public static final Integer TASK_DELAY=1;
    public static final String NO_FREE_CLASSROOM="没有空闲教室";
    public static final String ARRANGE_EXAMINATION_NOT_ALLOW_OVER="不允许重复安排考试";
    public static final String ROB_CLASSES_NOT_ALLOW="不允许开启抢课，已经安排完考试了";
    public static final String ARRANGE_EXAMINATION_NOT_ALLOW_BEFORE_ROB_CLASSES="不允许在抢课前安排考试";
    public static final String FLAG_ARRANGE_EXAMINATION="flag:arrangeExamination:";
    public static final String FLAG_ROB_CLASSES="flag:robClasses:";
    public static final String TASK_ROB_CLASSES_PREHEAT="task:robClassesPreheat";
    public static final String TASK_ARRANGE_EXAMINATION="task:arrangeExaminationScheduled";
    public static final String TASK_STOP_ROB_CLASSES="task:stopRobClasses";
    public static final String COURSE_TYPE_MAJOR="主修";
    public static final String COURSE_TYPE_OPTIONAL="选修";
    public static final String COURSE_TIME_CONFLICT="课程时间冲突";
    public static final String TIME_UNUSUAL="时间异常";
    public static final String EXAMINATION_NO_START="考试还未开始";
    public static final String EXAMINATION_NO_END="考试还未结束";
    public static final String EXAMINATION_NO_EXISTS="考试不存在";
    public static final String ADD_COURSE_SUCCESS="添加课程成功";
    public static final String CANCEL_COURSE_FAIL="取消课程失败";
    public static final String SCORE_INPUT_SUCCESS="成绩录入成功";
    public static final String SCORE_UPDATE_SUCCESS="成绩修改成功";
    public static final String TEACHER_PERMISSION_DENIED="老师权限不足，为该学生本科考试不可录入成绩";
    public static final String USER_PERMISSION_DENIED="用户权限不足";
    public static final String CANCEL_COURSE_SUCCESS="取消课程成功";
    public static final String UNKNOWN_COURSE="不存在该课程";
    public static final String SAVE_DATE_TIME="yyyy:MM:dd hh:mm:ss";
    public static final Integer ERROR_STATUS=666;
    public static final Integer ID_LEN=10;
    public static final String NOT_MANAGE_CLASS="没有管理的班级";
    public static final String[] DAY_OF_WEEK_LIST={"周一","周二","周三","周四","周五","周六","周日"};
    public static final String[] TIME_OF_DAY_LIST={"第一讲","第二讲","第三讲","第四讲","第五讲","第六讲"};
    public static final String NUMBER_OVER="数字过大";
    public static final String UPPER_TERM="上学期";
    public static final String DOWN_TERM="下学期";
    public static final String CHARSET_UTF_8="utf-8";
    public static final String PARAMS_ERROR="参数错误";
    public static final String ID_NUMBER_REGULAR_EXPRESSION="^[1-9]\\d{5}(18|19|20|(3\\d))\\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]$";
    public static final String PHONE_REGULAR_EXPRESSION="^1[3-9]\\d{9}$";
    public static final String GENERAL_ELECTIVE_COURSE_TERM="1,2,3,4,5,6,7,8";
    public static final String PARAMS_NULL="参数:为空 错误";
    public static final String PARAMS_ID_NUMBER_ERROR="参数:身份证号 错误";
    public static final String PARAMS_SCORE_ERROR="参数:分数 错误";
    public static final String PARAMS_START_END_WEEK_ERROR="参数:开始周，结束周 错误";
    public static final String PARAMS_TYPE_ERROR="参数:类型 错误";
    public static final String PARAMS_PHONE_ERROR="参数:电话 错误";
    public static final String PARAMS_SEX_ERROR="参数:性别 错误";
    public static final String DATE_TIME_FORMATTER="yyyy-MM-dd HH:mm:ss";
    public static final String GET_DATE_TIME_CRON="0 * * * * ?";
    public static final String SCHEDULE_DATE_PREFIX="schedule:date:";
    public static final String ARRANGE_EXAMINATION_KEY=SCHEDULE_DATE_PREFIX+"arrangeExamination:";
    public static final String ROB_CLASSES_PREHEAT_KEY=SCHEDULE_DATE_PREFIX+"robClassesPreHeat:";
    public static final String STOP_ROB_CLASSES_KEY=SCHEDULE_DATE_PREFIX+"stopRobClassesCron:";
    public static final Integer UPPER_TERM_MONTH=9;
//    public static final String COURSE_TIME_CONFLICT="课程时间冲突，抢课失败";
    public static final String UPPER_TERM_FLAG="0";
    public static final String CURRICULUM_TIME_SPLIT="\\|";
    public static final String CURRICULUM_TIME_SPLIT_JOIN="|";
    public static final String DOWN_TERM_FLAG="1";
    public static final Integer EXAMINATION_START_WEEK=18;
    public static final Integer DOWN_TERM_MONTH=3;
    public static final Integer COURSE_OPTIONAL_FLAG=1;
    public static final Integer EXAMINATION_DELAY_WEEK=2;
    public static final String COURSE_SCHOOL_TIME_SPLIT="\\|";
    public static final String COURSE_SCHOOL_TIME_SPLIT_JOIN="|";
    public static final String COURSE_RESTRICTED_MAJORS_SPLIT=",";
    public static final String COURSE_TERM_SPLIT=",";
    public static final Long SCHEDULE_TTL=30L;
    //秒 1个月
    public static final Long COURSE_TTL=2592000L;
    public static final String COURSE_RESTRICTED_MAJORS_GENERAL_ELECTIVE_COURSE="0";
    public static final String SCHEDULE_STUDENT_ID_PREFIX="schedule:student_id:";
    public static final String SCHEDULE_TERM_PREFIX=":term:";
    public static final String MAJOR_OPTIONAL_COURSE_ID_PREFIX="major:optional_course_id:";
    public static final String MAJOR_OPTIONAL_COURSE_TERM_PREFIX=":term:";
    public static final Integer UP_TERM_BEGIN_MONTH=9;
    public static final Integer UP_TERM_BEGIN_DAY=1;
    public static final Integer DOWN_TERM_BEGIN_MONTH=3;
    public static final Integer DOWN_TERM_BEGIN_DAY=1;

//    public static final String COURSE_
    public static final String GROUP_CREATE_ERROR="group 创建 错误";
    public static final String COURSE_QUANTITY_NOT_SUFFICIENT="课程的席位不足";
    public static final String PLEASE_DONT_STEAL_LESSONS_AGAIN="请不要重复抢课";
    public static final String NOT_ALLOW="不允许抢该课程！！权限不足";
    public static final String PARAMS_TERM_ERROR="学期参数异常";
    public static final Integer ONE_DAY_MAX_COURSE_AMOUNT=6;
    public static final String[] COURSE_CLASS_TIME={"8:00-9:40","10:00-11:40","2:00-3:40","4:00-5:40","7:00-8:40","9:00-10:40"};

    public static final String INCR_COURSE_ID_AMOUNT_PREFIX="incr:course_amount:id:";
    public static final String SCHOOL_CODE="10619";
    public static final String COURSE_INFO_PREFIX="course:info:id:";
    public static final String ROB_CLASSES_NEXT_TERM_PREFIX="robclasses:nextTermList:";
    public static final String COURSE_ID_PREFIX="course:id:";
    public static final String COURSE_AMOUNT_PREFIX="course:amount:";
    public static final String ROB_CLASSES_INFO_HANDLE_EXCEPTION="抢课信息处理异常";
    public static final String ROB_CLASSES_INFO_HANDLE_SUCCESS="抢课信息处理成功";
    public static final String ROB_CLASSES_INFO_HANDLE_EXCEPTION_AGAIN="抢课信息处理异常,again!!";
    public static final String ROB_CLASSES_LUA_SCRIPT="lua/robClasses.lua";
    public static final String CONSUMER_PREFIX="consumer:";
    public static final String CONSUMER_USER_PREFIX=CONSUMER_PREFIX+"user:";
    public static final String CONSUMER_GROUP_PREFIX=CONSUMER_PREFIX+"group:";
    public static final String STREAM_NAME_PREFIX="stream:";
    public static final String ROB_CLASSES="robClasses";
    public static final String ROB_GROUP_LAST_DELIVERED_ID="$";
    public static final String ROB_CLASSES_STREAM=STREAM_NAME_PREFIX+ROB_CLASSES;
    public static final String ROB_CLASSES_USER=CONSUMER_USER_PREFIX+ROB_CLASSES;

    public static final String ROB_CLASSES_GROUP=CONSUMER_GROUP_PREFIX+ROB_CLASSES;
    public static final String INCR_STUDENT_ID="incr:student:id:";
    public static final String INCR_TEACHER_ID="incr:teacher:id:";
    public static final String INCR_ADMINISTRATOR_ID="incr:administrator:id:";
    public static final String INCR_ELECTIVE_COURSE_ID="incr:electiveCourse:id:";
    public static final String INCR_EXAMINATION_ID="incr:examination:id:";
    public static final String INCR_CLASSROOM_ID="incr:classroom:id:";
    public static final String INCR_COURSE_INFORMATION_ID="incr:courseInformation:id:";
    public static final String INCR_STUDENT_CLASS_ID="incr:studentClass:id:";
    public static final String INCR_MAJOR_ID="incr:major:id:";
    public static final String INCR_ACADEMY_ID="incr:academy:id:";
    public static final int INCR_LEN=5;
    public static final int PASSWORD_DEFAULT_LEN=6;
    public static final String OVERS_INCR="账号数量超出系统限制";
    public static final String CLASS_TYPE_ERROR="Class 类型错误";
    public static final String PLEASE_LOGIN="请先登录账号";
    public static final String PASSWORD_ERROR="密码错误";

    public static final String UPDATE_FAIL="更新失败";
    public static final String LOGIN_INFO_EXPIRE="登录信息已过期,请重新登录";
    public static final String ID_NO_NULL="账号不能为空";
    public static final String PASSWORD_NO_NULL="密码不能为空";
    public static final String ID_OR_PASSWORD_ERROR="账号或密码错误";
    public static final String ACCOUNT_DISABLED="账号已经被禁用";

    public static final String ID_ERROR="账号错误，非法账号";

    public static final String LOGIN_ERROR="登录失败";
    public static final String CODE_ERROR="验证码错误";
    public static final String STUDENT_PREFIX="5";
    public static final String TEACHER_PREFIX="1";
    public static final String ADMINISTRATOR_PREFIX="0";
    public static final String ELECTIVE_COURSE_PREFIX="E";
    public static final String EXAMINATION_PREFIX="X";
    public static final String CLASSROOM_PREFIX="C";
    public static final String COURSE_INFORMATION_PREFIX="I";
    public static final String STUDENT_CLASS_PREFIX="K";
    public static final String MAJOR_PREFIX="M";
    public static final String ACADEMY_PREFIX="A";
//    public static final String ADMINISTRATOR_PREFIX="0";
//    public static final String ADMINISTRATOR_PREFIX="0";
    public static final String STUDENT_TYPE="student";
    public static final String TEACHER_TYPE="teacher";
    public static final String ADMINISTRATOR_TYPE="administrator";
    public static final String USER_CODE_PREFIX="user:code:";
    public static final String STUDENT_INFO_PREFIX="student:";
    public static final String TEACHER_INFO_PREFIX="teacher:";
    public static final String ADMINISTRATOR_INFO_PREFIX="administrator:";

    public static final Long CODE_TTL=5L;
    public static final Long LOGIN_INFO_TTL=30L;
}
